// |**| Opcon|OperationMango|**|Opcon|OperationMango|**|
// |**| Source Code for the FPS Operation Mango     |**|
// |**| Opcon|OperationMango|**|Opcon|OperationMango|**|

using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using System;

public static class MathExtensions
{
        public static Vector3 Apply(Quaternion quat, Vector3 vector)
        {
            Quaternion v = new Quaternion() { X = vector.X, Y = vector.Y, Z = vector.Z, W = 0 };
            Quaternion i = Quaternion.Invert(quat);
            Quaternion t = i * v;
            v = t * quat;
 
            return new Vector3(v.X, v.Y, v.Z);
        }
}